The present invention relates to an apparatus and method for detecting a specific pattern contained in an image.
A pattern matching processing has been known as one of data processing performed in an apparatus, such as copier, which stores obtained image data in an image memory as binary or multi-valued data and detects a specific pattern or recognizes a shape contained in an image by comparing the data with the pixel data of a reference pattern stored previously in a memory.
In recent years, as scanning input apparatus and printing output apparatus, those that can rapidly process a large amount of information such as high-resolution data have been widely used. With performing various data processings including pattern matching processing with these apparatus at real time, there is a problem that their hardware configurations become complex. In order to resolve this problem, a pattern-detection apparatus that can rapidly detect a specific pattern and has a simple configuration is desired.
As one of such pattern-detection apparatus, there is known an apparatus that recognizes a partial image having a predetermined shape and size and being part of a specific pattern, based on condition that (1) the number of ON-pixel within m×n pixel rectangle block area in the neighborhood of a target pixel falls within a predetermined range, and that (2) no ON-pixel exists within a predetermined area in the neighborhood of said block area, after low-resolution converting a binary data. However, this pattern-detection apparatus cannot precisely identify a partial image, in particular, having an empty inside and often wrongly detects another image, such as a circular image having an all over painted inside or a quadrilateral or triangular image composed of multiple pixels of the same size, with the desired partial image. Also, this pattern recognition apparatus cannot precisely identify the shape of a partial image and often wrongly detects for the desired image, another image such as an L-shaped image or diagonal line.
Further, as a pattern-detection apparatus that can rapidly detect a specific pattern and has a simple configuration, the following one is known. The specific pattern is the detection object for this apparatus and consists of a plurality of partial images having a predetermined shape and size. In this apparatus, binary image data is successively scanned by a filter in which the specific pattern is framed. A score is set for the arrangement of the partial images recognized in the area framed by the filter. The apparatus determines the detection of the specific pattern based on the score. However, in this apparatus, if at least one of the partial images constituting the specific pattern is not recognized, then even if the recognition results for other partial images are perfect, the specific pattern cannot be detected.